import { http } from "../utils/http";
import type {
  IGetCourseListApiResponse,
  IGetCourseDetailApiResponse,
} from "./types";

/**
 * 获取课程列表
 */
export const getCourseListApi = (page: number, limit: number) => {
  return http.get<IGetCourseListApiResponse>(`/edu/course/${page}/${limit}`);
};

/**
 * 获取课程详情
 */
export const getCourseDetailApi = (id: string) => {
  return http.get<IGetCourseDetailApiResponse>(`/edu/course/${id}`);
};
